<template>
	<view>
		<navbar></navbar>
		<view class="container">
			<view class="Top_tilte">
				{{toptitle}}
			</view>
			<view class="tab">
				<view class="item" v-for="(item,index) in tag" :key="index" @click="tagChoice(index,item)" :class="choice == index?'choice':''">
					{{item}}
				</view>
			</view>
			<view class="recordList">
				<view class="recordItem" v-for="(item,index) in recordList">
					<view class="topFlex">
						<view class="name oneOver">
							{{item.name}}
						</view>
						<view class="Price oneOver">
							{{item.Price}}
						</view>
					</view>
					<view class="date">
						{{item.date}}
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	const app = getApp();
	export default {
		data() {
			return {
				tag:['全部','提现中','提现失败','提现成功'],
				choice:0,
				toptitle:'提现记录',
				recordList:[
				{
					name:'提现到账-建设银行（3042）',
					date:'2022-06-18 20.20.20',
					Price:'9990'
				},
				{
					name:'提现到账-建设银行（3042）',
					date:'2022-06-18 20.20.20',
					Price:'9990'
				},
				{
					name:'提现到账-建设银行（3042）',
					date:'2022-06-18 20.20.20',
					Price:'9990'
				},
				]
			};
		},
		/**
		 * 生命周期函数--监听页面加载
		 */
		onLoad(options) {

		},
		methods: {
			NavRouter() {
				uni.navigateTo({
					url: `./addbank`
				});
			},
			/**
			 * 生命周期函数--监听页面加载
			 */
			NavData(){

				this.$store.commit('get_user_bankPhone','123123123')
				uni.navigateTo({
					url: `./bankData`
				});
			},
			/**
			 * tag切换
			 * e 选择的索引
			 * i 选择的值
			 */
			tagChoice(e,i){
				this.choice = e
				if(e == 0){
					this.toptitle= '提现记录'
				}else{
					this.toptitle = i
				}
			}
			
		}
	}
</script>

<style lang="scss">
	.container {
		background-color: #FAFAFA;
		height: 100vh;
	}

	.Top_tilte {
		margin-top: 40rpx;
		width: 100%;
		height: 80rpx;
		background-color: #FFFFFF;
		text-align: center;
		color: rgba(0, 0, 0, 0.9);
		font-size: 30rpx;
		font-family: 'dy-iconfont';
		font-weight: bold;
		line-height: 80rpx;
	}
	.tab{
		margin: 50rpx 30rpx;
		display: flex;
		align-items: flex-end;
		justify-content: space-between;
		font-size: 32rpx;
		font-weight: bold;
		color: rgba(0, 0, 0, 0.6);
		.choice{
			font-size: 40rpx;
			font-weight: 800;
			color: rgba(0, 0, 0, 0.9)
		}
	}
	.recordList{
		padding: 0 30rpx;
		.recordItem{
			margin-top: 30rpx;
			padding: 30rpx 25rpx;
			width: 100%;
			height: 150rpx;
			box-sizing: border-box;
			background-color: #fff;
			font-size: 30rpx;
			font-weight: bold;
			color: rgba(0, 0, 0, 0.9);
			.topFlex{
				display: flex;
                justify-content: space-between;
				align-items: center;
				.name{
					width: 400rpx;
				}
				.Price{
					text-align: center;
					width: 120rpx;
				}
			}
			.date{
				margin-top: 20rpx;
				font-size: 20rpx;
				font-weight: bold;
				color: rgba(0, 0, 0, 0.6);
			}
		}
	}
</style>
